package com.warm.pump.module.skd.dao.gen;

import java.util.List;
import java.util.Map;
import java.util.Date;
import java.math.BigDecimal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import com.warm.pump.frame.gen.bean.PageBean;
import com.warm.pump.frame.gen.util.TypeCast;
import com.warm.pump.frame.gen.exception.ServiceException;
import com.warm.pump.module.skd.bean.po.gen.ScheduleInstance;
import com.warm.pump.module.skd.mapper.gen.ScheduleInstanceMapper;
import com.warm.pump.module.skd.bean.po.gen.ScheduleInstanceExample;
@Repository
public class ScheduleInstanceDao {
	// 日志对象
	private transient Log log = LogFactory.getLog(this.getClass());
	@Autowired
	private ScheduleInstanceMapper scheduleInstanceMapper;

	// 增加一个后台ScheduleInstance表
	
	public boolean insert(ScheduleInstance scheduleInstance) {
		try {
			scheduleInstanceMapper.insert(scheduleInstance);
			log.debug("后台ScheduleInstance表增加成功");
			return true;
		} catch (Exception e) {
			log.debug("后台ScheduleInstance表增加失败");
			throw new ServiceException("后台ScheduleInstance表增加失败",e);
		}
	}
	// 增加一个后台ScheduleInstance表Selective
	
	public boolean insertSelective(ScheduleInstance scheduleInstance) {
		try {
			scheduleInstanceMapper.insertSelective(scheduleInstance);
			log.debug("后台ScheduleInstance表增加成功");
			return true;
		} catch (Exception e) {
			log.debug("后台ScheduleInstance表增加失败");
			throw new ServiceException("后台ScheduleInstance表增加失败",e);
		}
	}

	// 删除一个后台ScheduleInstance表
	
	public boolean deleteByPrimaryKey(Long id) {
		try{
			scheduleInstanceMapper.deleteByPrimaryKey(id);
			log.debug("后台ScheduleInstance表删除成功");
			return true;
		} catch(Exception e){
			log.debug("后台ScheduleInstance表删除失败");
			throw new ServiceException("后台ScheduleInstance表删除失败",e);
		}
	}
	// 删除一个后台ScheduleInstance表byMap
	
	public boolean deleteByMap(Map scheduleInstanceMap) {
		try{
			scheduleInstanceMapper.deleteByExample(createScheduleInstanceExample(scheduleInstanceMap,null,null));
			log.debug("后台ScheduleInstance根据Map删除成功");
			return true;
		}
		
		catch(Exception e){
			log.debug("后台ScheduleInstance根据GroupID删除失败");
			throw new ServiceException("后台ScheduleInstance根据object删除失败",e);
		}
	}
	// 修改一个后台ScheduleInstance表
	
	public boolean updateByPrimaryKey(ScheduleInstance scheduleInstance) {
		try{
			scheduleInstanceMapper.updateByPrimaryKey(scheduleInstance);
			log.debug("后台ScheduleInstance表修改成功");
			return true;
		}
		
		catch(Exception e){
			log.debug("后台ScheduleInstance表修改失败");
			throw new ServiceException("后台ScheduleInstance表修改失败",e);
		}
	}
	// 修改一个后台ScheduleInstance表Selective
	
	public boolean updateByPrimaryKeySelective(ScheduleInstance scheduleInstance) {
		try{
			scheduleInstanceMapper.updateByPrimaryKeySelective(scheduleInstance);
			log.debug("后台ScheduleInstance表修改成功");
			return true;
		}
		
		catch(Exception e){
			log.debug("后台ScheduleInstance表修改失败");
			throw new ServiceException("后台ScheduleInstance表修改失败",e);
		}
	}
	// 修改一个后台ScheduleInstance表
	
	public boolean updateByMap(ScheduleInstance scheduleInstance,Map scheduleInstanceMap) {
		try{
			scheduleInstanceMapper.updateByExample(scheduleInstance,createScheduleInstanceExample(scheduleInstanceMap,null,null));
			log.debug("后台批量ScheduleInstance表修改成功");
			return true;
		}
		catch(Exception e){
			log.debug("后台批量ScheduleInstance表修改失败");
			throw new ServiceException("后台ScheduleInstance表批量修改失败",e);
		}
	}
	// 修改一个后台ScheduleInstance表Selective
	
	public boolean updateByMapSelective(ScheduleInstance scheduleInstance,Map scheduleInstanceMap) {
		try{
			scheduleInstanceMapper.updateByExampleSelective(scheduleInstance,createScheduleInstanceExample(scheduleInstanceMap,null,null));
			log.debug("后台批量ScheduleInstance表修改成功");
			return true;
		}
		catch(Exception e){
			log.debug("后台批量ScheduleInstance表修改失败");
			throw new ServiceException("后台ScheduleInstance表批量修改失败",e);
		}
	}

	// 查询一个后台ScheduleInstance表
	
	public ScheduleInstance selectByPrimaryKey(Long id) {
		return scheduleInstanceMapper.selectByPrimaryKey(id);
	}
	
	// 查询一个后台ScheduleInstance表-根据map
	
	public ScheduleInstance selectByMap(Map scheduleInstanceMap) {
		List<ScheduleInstance> list = getListByMap(scheduleInstanceMap);
		if(list==null||list.isEmpty()){
			return null;
		}else{
			return list.get(0);
		}
	}

	////////////////////////////////////////////////////////////////////////////////////////////////////////
	// 查询所有后台ScheduleInstance表
	
	public List<ScheduleInstance> getListByMap(Map scheduleInstanceMap) {
		
		return scheduleInstanceMapper.selectByExample(createScheduleInstanceExample(scheduleInstanceMap,null,null));
	}

	//统计后台ScheduleInstance表数量
	
	public int countTotalByMap(Map scheduleInstanceMap) {
		
		return scheduleInstanceMapper.countByExample(createScheduleInstanceExample(scheduleInstanceMap,null,null));
	}

	
	public List<ScheduleInstance> getListByMapPage(Map scheduleInstanceMap, int limitStart,
			int limitOffset) {
		
		return scheduleInstanceMapper.selectByExample(createScheduleInstanceExample(scheduleInstanceMap,limitStart,limitOffset));
	}
	
	
	public PageBean getPageBeanByMap(Map scheduleInstanceMap,int pageNo,int pageSize) {
		Integer count = countTotalByMap(scheduleInstanceMap);
		PageBean pageBean = new PageBean();
		pageBean.setCount(count);
		pageBean.setPageNo(pageNo);
		pageBean.setPageSize(pageSize);
		int limitStart = pageBean.getStartNo();
		int limitOffset = pageSize;
		pageBean.setData(scheduleInstanceMapper.selectByExample(createScheduleInstanceExample(scheduleInstanceMap,limitStart,limitOffset)));
		return pageBean;
	}
		
	private ScheduleInstanceExample createScheduleInstanceExample(Map scheduleInstanceMap,Integer limitStart,Integer limitOffset){
			ScheduleInstanceExample scheduleInstanceEx = new ScheduleInstanceExample();
			ScheduleInstanceExample.Criteria c = scheduleInstanceEx.createCriteria();
				Long id_null = TypeCast.getLong(scheduleInstanceMap.get("id_null"));
				Long id_notNull = TypeCast.getLong(scheduleInstanceMap.get("id_notNull"));
				Long id = TypeCast.getLong(scheduleInstanceMap.get("id"));
				Long id_not = TypeCast.getLong(scheduleInstanceMap.get("id_not"));
				Long id_greater = TypeCast.getLong(scheduleInstanceMap.get("id_greater"));
				Long id_greaterEqual = TypeCast.getLong(scheduleInstanceMap.get("id_greaterEqual"));
				Long id_less = TypeCast.getLong(scheduleInstanceMap.get("id_less"));
				Long id_lessEqual = TypeCast.getLong(scheduleInstanceMap.get("id_lessEqual"));
				List<Long> id_in = TypeCast.getLongList(scheduleInstanceMap.get("id_in"));
				List<Long> id_notIn = TypeCast.getLongList(scheduleInstanceMap.get("id_notIn"));
				Long id_between1 = TypeCast.getLong(scheduleInstanceMap.get("id_between1"));
				Long id_between2 = TypeCast.getLong(scheduleInstanceMap.get("id_between2"));
				Long id_notBetween1 = TypeCast.getLong(scheduleInstanceMap.get("id_notBetween1"));
				Long id_notBetween2 = TypeCast.getLong(scheduleInstanceMap.get("id_notBetween2"));
				
				if(id_null != null){
					c.andIdIsNull();
				}
				if(id_notNull != null){
					c.andIdIsNotNull();
				}
				if(id != null){
					c.andIdEqualTo(id);
				}
				if(id_not != null){
					c.andIdNotEqualTo(id_not);
				}
				if(id_greater != null){
					c.andIdGreaterThan(id_greater);
				}
				if(id_greaterEqual != null){
					c.andIdGreaterThanOrEqualTo(id_greaterEqual);
				}
				if(id_less != null){
					c.andIdLessThan(id_less);
				}
				if(id_lessEqual != null){
					c.andIdLessThanOrEqualTo(id_lessEqual);
				}
				if(id_in != null){
					c.andIdIn(id_in);
				}
				if(id_notIn != null){
					c.andIdNotIn(id_notIn);
				}
				if(id_between1 != null){
					c.andIdBetween(id_between1,id_between2);
				}
				if(id_notBetween1 != null){
					c.andIdNotBetween(id_notBetween1,id_notBetween2);
				}
				String instanceId_null = TypeCast.getString(scheduleInstanceMap.get("instanceId_null"));
				String instanceId_notNull = TypeCast.getString(scheduleInstanceMap.get("instanceId_notNull"));
				String instanceId = TypeCast.getString(scheduleInstanceMap.get("instanceId"));
				String instanceId_not = TypeCast.getString(scheduleInstanceMap.get("instanceId_not"));
				String instanceId_greater = TypeCast.getString(scheduleInstanceMap.get("instanceId_greater"));
				String instanceId_greaterEqual = TypeCast.getString(scheduleInstanceMap.get("instanceId_greaterEqual"));
				String instanceId_less = TypeCast.getString(scheduleInstanceMap.get("instanceId_less"));
				String instanceId_lessEqual = TypeCast.getString(scheduleInstanceMap.get("instanceId_lessEqual"));
				String instanceId_like = TypeCast.getString(scheduleInstanceMap.get("instanceId_like"));
				String instanceId_notLike = TypeCast.getString(scheduleInstanceMap.get("instanceId_notLike"));
				List<String> instanceId_in = TypeCast.getStringList(scheduleInstanceMap.get("instanceId_in"));
				List<String> instanceId_notIn = TypeCast.getStringList(scheduleInstanceMap.get("instanceId_notIn"));
				String instanceId_between1 = TypeCast.getString(scheduleInstanceMap.get("instanceId_between1"));
				String instanceId_between2 = TypeCast.getString(scheduleInstanceMap.get("instanceId_between2"));
				String instanceId_notBetween1 = TypeCast.getString(scheduleInstanceMap.get("instanceId_notBetween1"));
				String instanceId_notBetween2 = TypeCast.getString(scheduleInstanceMap.get("instanceId_notBetween2"));
				
				if(instanceId_null != null){
					c.andInstanceIdIsNull();
				}
				if(instanceId_notNull != null){
					c.andInstanceIdIsNotNull();
				}
				if(instanceId != null){
					c.andInstanceIdEqualTo(instanceId);
				}
				if(instanceId_not != null){
					c.andInstanceIdNotEqualTo(instanceId_not);
				}
				if(instanceId_greater != null){
					c.andInstanceIdGreaterThan(instanceId_greater);
				}
				if(instanceId_greaterEqual != null){
					c.andInstanceIdGreaterThanOrEqualTo(instanceId_greaterEqual);
				}
				if(instanceId_less != null){
					c.andInstanceIdLessThan(instanceId_less);
				}
				if(instanceId_lessEqual != null){
					c.andInstanceIdLessThanOrEqualTo(instanceId_lessEqual);
				}
				if(instanceId_like != null){
					c.andInstanceIdLike(instanceId_like);
				}
				if(instanceId_notLike != null){
					c.andInstanceIdNotLike(instanceId_notLike);
				}
				if(instanceId_in != null){
					c.andInstanceIdIn(instanceId_in);
				}
				if(instanceId_notIn != null){
					c.andInstanceIdNotIn(instanceId_notIn);
				}
				if(instanceId_between1 != null){
					c.andInstanceIdBetween(instanceId_between1,instanceId_between2);
				}
				if(instanceId_notBetween1 != null){
					c.andInstanceIdNotBetween(instanceId_notBetween1,instanceId_notBetween2);
				}
				String referType_null = TypeCast.getString(scheduleInstanceMap.get("referType_null"));
				String referType_notNull = TypeCast.getString(scheduleInstanceMap.get("referType_notNull"));
				String referType = TypeCast.getString(scheduleInstanceMap.get("referType"));
				String referType_not = TypeCast.getString(scheduleInstanceMap.get("referType_not"));
				String referType_greater = TypeCast.getString(scheduleInstanceMap.get("referType_greater"));
				String referType_greaterEqual = TypeCast.getString(scheduleInstanceMap.get("referType_greaterEqual"));
				String referType_less = TypeCast.getString(scheduleInstanceMap.get("referType_less"));
				String referType_lessEqual = TypeCast.getString(scheduleInstanceMap.get("referType_lessEqual"));
				String referType_like = TypeCast.getString(scheduleInstanceMap.get("referType_like"));
				String referType_notLike = TypeCast.getString(scheduleInstanceMap.get("referType_notLike"));
				List<String> referType_in = TypeCast.getStringList(scheduleInstanceMap.get("referType_in"));
				List<String> referType_notIn = TypeCast.getStringList(scheduleInstanceMap.get("referType_notIn"));
				String referType_between1 = TypeCast.getString(scheduleInstanceMap.get("referType_between1"));
				String referType_between2 = TypeCast.getString(scheduleInstanceMap.get("referType_between2"));
				String referType_notBetween1 = TypeCast.getString(scheduleInstanceMap.get("referType_notBetween1"));
				String referType_notBetween2 = TypeCast.getString(scheduleInstanceMap.get("referType_notBetween2"));
				
				if(referType_null != null){
					c.andReferTypeIsNull();
				}
				if(referType_notNull != null){
					c.andReferTypeIsNotNull();
				}
				if(referType != null){
					c.andReferTypeEqualTo(referType);
				}
				if(referType_not != null){
					c.andReferTypeNotEqualTo(referType_not);
				}
				if(referType_greater != null){
					c.andReferTypeGreaterThan(referType_greater);
				}
				if(referType_greaterEqual != null){
					c.andReferTypeGreaterThanOrEqualTo(referType_greaterEqual);
				}
				if(referType_less != null){
					c.andReferTypeLessThan(referType_less);
				}
				if(referType_lessEqual != null){
					c.andReferTypeLessThanOrEqualTo(referType_lessEqual);
				}
				if(referType_like != null){
					c.andReferTypeLike(referType_like);
				}
				if(referType_notLike != null){
					c.andReferTypeNotLike(referType_notLike);
				}
				if(referType_in != null){
					c.andReferTypeIn(referType_in);
				}
				if(referType_notIn != null){
					c.andReferTypeNotIn(referType_notIn);
				}
				if(referType_between1 != null){
					c.andReferTypeBetween(referType_between1,referType_between2);
				}
				if(referType_notBetween1 != null){
					c.andReferTypeNotBetween(referType_notBetween1,referType_notBetween2);
				}
				Long referId_null = TypeCast.getLong(scheduleInstanceMap.get("referId_null"));
				Long referId_notNull = TypeCast.getLong(scheduleInstanceMap.get("referId_notNull"));
				Long referId = TypeCast.getLong(scheduleInstanceMap.get("referId"));
				Long referId_not = TypeCast.getLong(scheduleInstanceMap.get("referId_not"));
				Long referId_greater = TypeCast.getLong(scheduleInstanceMap.get("referId_greater"));
				Long referId_greaterEqual = TypeCast.getLong(scheduleInstanceMap.get("referId_greaterEqual"));
				Long referId_less = TypeCast.getLong(scheduleInstanceMap.get("referId_less"));
				Long referId_lessEqual = TypeCast.getLong(scheduleInstanceMap.get("referId_lessEqual"));
				List<Long> referId_in = TypeCast.getLongList(scheduleInstanceMap.get("referId_in"));
				List<Long> referId_notIn = TypeCast.getLongList(scheduleInstanceMap.get("referId_notIn"));
				Long referId_between1 = TypeCast.getLong(scheduleInstanceMap.get("referId_between1"));
				Long referId_between2 = TypeCast.getLong(scheduleInstanceMap.get("referId_between2"));
				Long referId_notBetween1 = TypeCast.getLong(scheduleInstanceMap.get("referId_notBetween1"));
				Long referId_notBetween2 = TypeCast.getLong(scheduleInstanceMap.get("referId_notBetween2"));
				
				if(referId_null != null){
					c.andReferIdIsNull();
				}
				if(referId_notNull != null){
					c.andReferIdIsNotNull();
				}
				if(referId != null){
					c.andReferIdEqualTo(referId);
				}
				if(referId_not != null){
					c.andReferIdNotEqualTo(referId_not);
				}
				if(referId_greater != null){
					c.andReferIdGreaterThan(referId_greater);
				}
				if(referId_greaterEqual != null){
					c.andReferIdGreaterThanOrEqualTo(referId_greaterEqual);
				}
				if(referId_less != null){
					c.andReferIdLessThan(referId_less);
				}
				if(referId_lessEqual != null){
					c.andReferIdLessThanOrEqualTo(referId_lessEqual);
				}
				if(referId_in != null){
					c.andReferIdIn(referId_in);
				}
				if(referId_notIn != null){
					c.andReferIdNotIn(referId_notIn);
				}
				if(referId_between1 != null){
					c.andReferIdBetween(referId_between1,referId_between2);
				}
				if(referId_notBetween1 != null){
					c.andReferIdNotBetween(referId_notBetween1,referId_notBetween2);
				}
				String referName_null = TypeCast.getString(scheduleInstanceMap.get("referName_null"));
				String referName_notNull = TypeCast.getString(scheduleInstanceMap.get("referName_notNull"));
				String referName = TypeCast.getString(scheduleInstanceMap.get("referName"));
				String referName_not = TypeCast.getString(scheduleInstanceMap.get("referName_not"));
				String referName_greater = TypeCast.getString(scheduleInstanceMap.get("referName_greater"));
				String referName_greaterEqual = TypeCast.getString(scheduleInstanceMap.get("referName_greaterEqual"));
				String referName_less = TypeCast.getString(scheduleInstanceMap.get("referName_less"));
				String referName_lessEqual = TypeCast.getString(scheduleInstanceMap.get("referName_lessEqual"));
				String referName_like = TypeCast.getString(scheduleInstanceMap.get("referName_like"));
				String referName_notLike = TypeCast.getString(scheduleInstanceMap.get("referName_notLike"));
				List<String> referName_in = TypeCast.getStringList(scheduleInstanceMap.get("referName_in"));
				List<String> referName_notIn = TypeCast.getStringList(scheduleInstanceMap.get("referName_notIn"));
				String referName_between1 = TypeCast.getString(scheduleInstanceMap.get("referName_between1"));
				String referName_between2 = TypeCast.getString(scheduleInstanceMap.get("referName_between2"));
				String referName_notBetween1 = TypeCast.getString(scheduleInstanceMap.get("referName_notBetween1"));
				String referName_notBetween2 = TypeCast.getString(scheduleInstanceMap.get("referName_notBetween2"));
				
				if(referName_null != null){
					c.andReferNameIsNull();
				}
				if(referName_notNull != null){
					c.andReferNameIsNotNull();
				}
				if(referName != null){
					c.andReferNameEqualTo(referName);
				}
				if(referName_not != null){
					c.andReferNameNotEqualTo(referName_not);
				}
				if(referName_greater != null){
					c.andReferNameGreaterThan(referName_greater);
				}
				if(referName_greaterEqual != null){
					c.andReferNameGreaterThanOrEqualTo(referName_greaterEqual);
				}
				if(referName_less != null){
					c.andReferNameLessThan(referName_less);
				}
				if(referName_lessEqual != null){
					c.andReferNameLessThanOrEqualTo(referName_lessEqual);
				}
				if(referName_like != null){
					c.andReferNameLike(referName_like);
				}
				if(referName_notLike != null){
					c.andReferNameNotLike(referName_notLike);
				}
				if(referName_in != null){
					c.andReferNameIn(referName_in);
				}
				if(referName_notIn != null){
					c.andReferNameNotIn(referName_notIn);
				}
				if(referName_between1 != null){
					c.andReferNameBetween(referName_between1,referName_between2);
				}
				if(referName_notBetween1 != null){
					c.andReferNameNotBetween(referName_notBetween1,referName_notBetween2);
				}
				Integer status_null = TypeCast.getInteger(scheduleInstanceMap.get("status_null"));
				Integer status_notNull = TypeCast.getInteger(scheduleInstanceMap.get("status_notNull"));
				Integer status = TypeCast.getInteger(scheduleInstanceMap.get("status"));
				Integer status_not = TypeCast.getInteger(scheduleInstanceMap.get("status_not"));
				Integer status_greater = TypeCast.getInteger(scheduleInstanceMap.get("status_greater"));
				Integer status_greaterEqual = TypeCast.getInteger(scheduleInstanceMap.get("status_greaterEqual"));
				Integer status_less = TypeCast.getInteger(scheduleInstanceMap.get("status_less"));
				Integer status_lessEqual = TypeCast.getInteger(scheduleInstanceMap.get("status_lessEqual"));
				List<Integer> status_in = TypeCast.getIntegerList(scheduleInstanceMap.get("status_in"));
				List<Integer> status_notIn = TypeCast.getIntegerList(scheduleInstanceMap.get("status_notIn"));
				Integer status_between1 = TypeCast.getInteger(scheduleInstanceMap.get("status_between1"));
				Integer status_between2 = TypeCast.getInteger(scheduleInstanceMap.get("status_between2"));
				Integer status_notBetween1 = TypeCast.getInteger(scheduleInstanceMap.get("status_notBetween1"));
				Integer status_notBetween2 = TypeCast.getInteger(scheduleInstanceMap.get("status_notBetween2"));
				
				if(status_null != null){
					c.andStatusIsNull();
				}
				if(status_notNull != null){
					c.andStatusIsNotNull();
				}
				if(status != null){
					c.andStatusEqualTo(status);
				}
				if(status_not != null){
					c.andStatusNotEqualTo(status_not);
				}
				if(status_greater != null){
					c.andStatusGreaterThan(status_greater);
				}
				if(status_greaterEqual != null){
					c.andStatusGreaterThanOrEqualTo(status_greaterEqual);
				}
				if(status_less != null){
					c.andStatusLessThan(status_less);
				}
				if(status_lessEqual != null){
					c.andStatusLessThanOrEqualTo(status_lessEqual);
				}
				if(status_in != null){
					c.andStatusIn(status_in);
				}
				if(status_notIn != null){
					c.andStatusNotIn(status_notIn);
				}
				if(status_between1 != null){
					c.andStatusBetween(status_between1,status_between2);
				}
				if(status_notBetween1 != null){
					c.andStatusNotBetween(status_notBetween1,status_notBetween2);
				}
				String remark_null = TypeCast.getString(scheduleInstanceMap.get("remark_null"));
				String remark_notNull = TypeCast.getString(scheduleInstanceMap.get("remark_notNull"));
				String remark = TypeCast.getString(scheduleInstanceMap.get("remark"));
				String remark_not = TypeCast.getString(scheduleInstanceMap.get("remark_not"));
				String remark_greater = TypeCast.getString(scheduleInstanceMap.get("remark_greater"));
				String remark_greaterEqual = TypeCast.getString(scheduleInstanceMap.get("remark_greaterEqual"));
				String remark_less = TypeCast.getString(scheduleInstanceMap.get("remark_less"));
				String remark_lessEqual = TypeCast.getString(scheduleInstanceMap.get("remark_lessEqual"));
				String remark_like = TypeCast.getString(scheduleInstanceMap.get("remark_like"));
				String remark_notLike = TypeCast.getString(scheduleInstanceMap.get("remark_notLike"));
				List<String> remark_in = TypeCast.getStringList(scheduleInstanceMap.get("remark_in"));
				List<String> remark_notIn = TypeCast.getStringList(scheduleInstanceMap.get("remark_notIn"));
				String remark_between1 = TypeCast.getString(scheduleInstanceMap.get("remark_between1"));
				String remark_between2 = TypeCast.getString(scheduleInstanceMap.get("remark_between2"));
				String remark_notBetween1 = TypeCast.getString(scheduleInstanceMap.get("remark_notBetween1"));
				String remark_notBetween2 = TypeCast.getString(scheduleInstanceMap.get("remark_notBetween2"));
				
				if(remark_null != null){
					c.andRemarkIsNull();
				}
				if(remark_notNull != null){
					c.andRemarkIsNotNull();
				}
				if(remark != null){
					c.andRemarkEqualTo(remark);
				}
				if(remark_not != null){
					c.andRemarkNotEqualTo(remark_not);
				}
				if(remark_greater != null){
					c.andRemarkGreaterThan(remark_greater);
				}
				if(remark_greaterEqual != null){
					c.andRemarkGreaterThanOrEqualTo(remark_greaterEqual);
				}
				if(remark_less != null){
					c.andRemarkLessThan(remark_less);
				}
				if(remark_lessEqual != null){
					c.andRemarkLessThanOrEqualTo(remark_lessEqual);
				}
				if(remark_like != null){
					c.andRemarkLike(remark_like);
				}
				if(remark_notLike != null){
					c.andRemarkNotLike(remark_notLike);
				}
				if(remark_in != null){
					c.andRemarkIn(remark_in);
				}
				if(remark_notIn != null){
					c.andRemarkNotIn(remark_notIn);
				}
				if(remark_between1 != null){
					c.andRemarkBetween(remark_between1,remark_between2);
				}
				if(remark_notBetween1 != null){
					c.andRemarkNotBetween(remark_notBetween1,remark_notBetween2);
				}
				String error_null = TypeCast.getString(scheduleInstanceMap.get("error_null"));
				String error_notNull = TypeCast.getString(scheduleInstanceMap.get("error_notNull"));
				String error = TypeCast.getString(scheduleInstanceMap.get("error"));
				String error_not = TypeCast.getString(scheduleInstanceMap.get("error_not"));
				String error_greater = TypeCast.getString(scheduleInstanceMap.get("error_greater"));
				String error_greaterEqual = TypeCast.getString(scheduleInstanceMap.get("error_greaterEqual"));
				String error_less = TypeCast.getString(scheduleInstanceMap.get("error_less"));
				String error_lessEqual = TypeCast.getString(scheduleInstanceMap.get("error_lessEqual"));
				String error_like = TypeCast.getString(scheduleInstanceMap.get("error_like"));
				String error_notLike = TypeCast.getString(scheduleInstanceMap.get("error_notLike"));
				List<String> error_in = TypeCast.getStringList(scheduleInstanceMap.get("error_in"));
				List<String> error_notIn = TypeCast.getStringList(scheduleInstanceMap.get("error_notIn"));
				String error_between1 = TypeCast.getString(scheduleInstanceMap.get("error_between1"));
				String error_between2 = TypeCast.getString(scheduleInstanceMap.get("error_between2"));
				String error_notBetween1 = TypeCast.getString(scheduleInstanceMap.get("error_notBetween1"));
				String error_notBetween2 = TypeCast.getString(scheduleInstanceMap.get("error_notBetween2"));
				
				if(error_null != null){
					c.andErrorIsNull();
				}
				if(error_notNull != null){
					c.andErrorIsNotNull();
				}
				if(error != null){
					c.andErrorEqualTo(error);
				}
				if(error_not != null){
					c.andErrorNotEqualTo(error_not);
				}
				if(error_greater != null){
					c.andErrorGreaterThan(error_greater);
				}
				if(error_greaterEqual != null){
					c.andErrorGreaterThanOrEqualTo(error_greaterEqual);
				}
				if(error_less != null){
					c.andErrorLessThan(error_less);
				}
				if(error_lessEqual != null){
					c.andErrorLessThanOrEqualTo(error_lessEqual);
				}
				if(error_like != null){
					c.andErrorLike(error_like);
				}
				if(error_notLike != null){
					c.andErrorNotLike(error_notLike);
				}
				if(error_in != null){
					c.andErrorIn(error_in);
				}
				if(error_notIn != null){
					c.andErrorNotIn(error_notIn);
				}
				if(error_between1 != null){
					c.andErrorBetween(error_between1,error_between2);
				}
				if(error_notBetween1 != null){
					c.andErrorNotBetween(error_notBetween1,error_notBetween2);
				}
				Integer totalNum_null = TypeCast.getInteger(scheduleInstanceMap.get("totalNum_null"));
				Integer totalNum_notNull = TypeCast.getInteger(scheduleInstanceMap.get("totalNum_notNull"));
				Integer totalNum = TypeCast.getInteger(scheduleInstanceMap.get("totalNum"));
				Integer totalNum_not = TypeCast.getInteger(scheduleInstanceMap.get("totalNum_not"));
				Integer totalNum_greater = TypeCast.getInteger(scheduleInstanceMap.get("totalNum_greater"));
				Integer totalNum_greaterEqual = TypeCast.getInteger(scheduleInstanceMap.get("totalNum_greaterEqual"));
				Integer totalNum_less = TypeCast.getInteger(scheduleInstanceMap.get("totalNum_less"));
				Integer totalNum_lessEqual = TypeCast.getInteger(scheduleInstanceMap.get("totalNum_lessEqual"));
				List<Integer> totalNum_in = TypeCast.getIntegerList(scheduleInstanceMap.get("totalNum_in"));
				List<Integer> totalNum_notIn = TypeCast.getIntegerList(scheduleInstanceMap.get("totalNum_notIn"));
				Integer totalNum_between1 = TypeCast.getInteger(scheduleInstanceMap.get("totalNum_between1"));
				Integer totalNum_between2 = TypeCast.getInteger(scheduleInstanceMap.get("totalNum_between2"));
				Integer totalNum_notBetween1 = TypeCast.getInteger(scheduleInstanceMap.get("totalNum_notBetween1"));
				Integer totalNum_notBetween2 = TypeCast.getInteger(scheduleInstanceMap.get("totalNum_notBetween2"));
				
				if(totalNum_null != null){
					c.andTotalNumIsNull();
				}
				if(totalNum_notNull != null){
					c.andTotalNumIsNotNull();
				}
				if(totalNum != null){
					c.andTotalNumEqualTo(totalNum);
				}
				if(totalNum_not != null){
					c.andTotalNumNotEqualTo(totalNum_not);
				}
				if(totalNum_greater != null){
					c.andTotalNumGreaterThan(totalNum_greater);
				}
				if(totalNum_greaterEqual != null){
					c.andTotalNumGreaterThanOrEqualTo(totalNum_greaterEqual);
				}
				if(totalNum_less != null){
					c.andTotalNumLessThan(totalNum_less);
				}
				if(totalNum_lessEqual != null){
					c.andTotalNumLessThanOrEqualTo(totalNum_lessEqual);
				}
				if(totalNum_in != null){
					c.andTotalNumIn(totalNum_in);
				}
				if(totalNum_notIn != null){
					c.andTotalNumNotIn(totalNum_notIn);
				}
				if(totalNum_between1 != null){
					c.andTotalNumBetween(totalNum_between1,totalNum_between2);
				}
				if(totalNum_notBetween1 != null){
					c.andTotalNumNotBetween(totalNum_notBetween1,totalNum_notBetween2);
				}
				Integer completedNum_null = TypeCast.getInteger(scheduleInstanceMap.get("completedNum_null"));
				Integer completedNum_notNull = TypeCast.getInteger(scheduleInstanceMap.get("completedNum_notNull"));
				Integer completedNum = TypeCast.getInteger(scheduleInstanceMap.get("completedNum"));
				Integer completedNum_not = TypeCast.getInteger(scheduleInstanceMap.get("completedNum_not"));
				Integer completedNum_greater = TypeCast.getInteger(scheduleInstanceMap.get("completedNum_greater"));
				Integer completedNum_greaterEqual = TypeCast.getInteger(scheduleInstanceMap.get("completedNum_greaterEqual"));
				Integer completedNum_less = TypeCast.getInteger(scheduleInstanceMap.get("completedNum_less"));
				Integer completedNum_lessEqual = TypeCast.getInteger(scheduleInstanceMap.get("completedNum_lessEqual"));
				List<Integer> completedNum_in = TypeCast.getIntegerList(scheduleInstanceMap.get("completedNum_in"));
				List<Integer> completedNum_notIn = TypeCast.getIntegerList(scheduleInstanceMap.get("completedNum_notIn"));
				Integer completedNum_between1 = TypeCast.getInteger(scheduleInstanceMap.get("completedNum_between1"));
				Integer completedNum_between2 = TypeCast.getInteger(scheduleInstanceMap.get("completedNum_between2"));
				Integer completedNum_notBetween1 = TypeCast.getInteger(scheduleInstanceMap.get("completedNum_notBetween1"));
				Integer completedNum_notBetween2 = TypeCast.getInteger(scheduleInstanceMap.get("completedNum_notBetween2"));
				
				if(completedNum_null != null){
					c.andCompletedNumIsNull();
				}
				if(completedNum_notNull != null){
					c.andCompletedNumIsNotNull();
				}
				if(completedNum != null){
					c.andCompletedNumEqualTo(completedNum);
				}
				if(completedNum_not != null){
					c.andCompletedNumNotEqualTo(completedNum_not);
				}
				if(completedNum_greater != null){
					c.andCompletedNumGreaterThan(completedNum_greater);
				}
				if(completedNum_greaterEqual != null){
					c.andCompletedNumGreaterThanOrEqualTo(completedNum_greaterEqual);
				}
				if(completedNum_less != null){
					c.andCompletedNumLessThan(completedNum_less);
				}
				if(completedNum_lessEqual != null){
					c.andCompletedNumLessThanOrEqualTo(completedNum_lessEqual);
				}
				if(completedNum_in != null){
					c.andCompletedNumIn(completedNum_in);
				}
				if(completedNum_notIn != null){
					c.andCompletedNumNotIn(completedNum_notIn);
				}
				if(completedNum_between1 != null){
					c.andCompletedNumBetween(completedNum_between1,completedNum_between2);
				}
				if(completedNum_notBetween1 != null){
					c.andCompletedNumNotBetween(completedNum_notBetween1,completedNum_notBetween2);
				}
				Integer waitNum_null = TypeCast.getInteger(scheduleInstanceMap.get("waitNum_null"));
				Integer waitNum_notNull = TypeCast.getInteger(scheduleInstanceMap.get("waitNum_notNull"));
				Integer waitNum = TypeCast.getInteger(scheduleInstanceMap.get("waitNum"));
				Integer waitNum_not = TypeCast.getInteger(scheduleInstanceMap.get("waitNum_not"));
				Integer waitNum_greater = TypeCast.getInteger(scheduleInstanceMap.get("waitNum_greater"));
				Integer waitNum_greaterEqual = TypeCast.getInteger(scheduleInstanceMap.get("waitNum_greaterEqual"));
				Integer waitNum_less = TypeCast.getInteger(scheduleInstanceMap.get("waitNum_less"));
				Integer waitNum_lessEqual = TypeCast.getInteger(scheduleInstanceMap.get("waitNum_lessEqual"));
				List<Integer> waitNum_in = TypeCast.getIntegerList(scheduleInstanceMap.get("waitNum_in"));
				List<Integer> waitNum_notIn = TypeCast.getIntegerList(scheduleInstanceMap.get("waitNum_notIn"));
				Integer waitNum_between1 = TypeCast.getInteger(scheduleInstanceMap.get("waitNum_between1"));
				Integer waitNum_between2 = TypeCast.getInteger(scheduleInstanceMap.get("waitNum_between2"));
				Integer waitNum_notBetween1 = TypeCast.getInteger(scheduleInstanceMap.get("waitNum_notBetween1"));
				Integer waitNum_notBetween2 = TypeCast.getInteger(scheduleInstanceMap.get("waitNum_notBetween2"));
				
				if(waitNum_null != null){
					c.andWaitNumIsNull();
				}
				if(waitNum_notNull != null){
					c.andWaitNumIsNotNull();
				}
				if(waitNum != null){
					c.andWaitNumEqualTo(waitNum);
				}
				if(waitNum_not != null){
					c.andWaitNumNotEqualTo(waitNum_not);
				}
				if(waitNum_greater != null){
					c.andWaitNumGreaterThan(waitNum_greater);
				}
				if(waitNum_greaterEqual != null){
					c.andWaitNumGreaterThanOrEqualTo(waitNum_greaterEqual);
				}
				if(waitNum_less != null){
					c.andWaitNumLessThan(waitNum_less);
				}
				if(waitNum_lessEqual != null){
					c.andWaitNumLessThanOrEqualTo(waitNum_lessEqual);
				}
				if(waitNum_in != null){
					c.andWaitNumIn(waitNum_in);
				}
				if(waitNum_notIn != null){
					c.andWaitNumNotIn(waitNum_notIn);
				}
				if(waitNum_between1 != null){
					c.andWaitNumBetween(waitNum_between1,waitNum_between2);
				}
				if(waitNum_notBetween1 != null){
					c.andWaitNumNotBetween(waitNum_notBetween1,waitNum_notBetween2);
				}
				Integer dealTaskNum_null = TypeCast.getInteger(scheduleInstanceMap.get("dealTaskNum_null"));
				Integer dealTaskNum_notNull = TypeCast.getInteger(scheduleInstanceMap.get("dealTaskNum_notNull"));
				Integer dealTaskNum = TypeCast.getInteger(scheduleInstanceMap.get("dealTaskNum"));
				Integer dealTaskNum_not = TypeCast.getInteger(scheduleInstanceMap.get("dealTaskNum_not"));
				Integer dealTaskNum_greater = TypeCast.getInteger(scheduleInstanceMap.get("dealTaskNum_greater"));
				Integer dealTaskNum_greaterEqual = TypeCast.getInteger(scheduleInstanceMap.get("dealTaskNum_greaterEqual"));
				Integer dealTaskNum_less = TypeCast.getInteger(scheduleInstanceMap.get("dealTaskNum_less"));
				Integer dealTaskNum_lessEqual = TypeCast.getInteger(scheduleInstanceMap.get("dealTaskNum_lessEqual"));
				List<Integer> dealTaskNum_in = TypeCast.getIntegerList(scheduleInstanceMap.get("dealTaskNum_in"));
				List<Integer> dealTaskNum_notIn = TypeCast.getIntegerList(scheduleInstanceMap.get("dealTaskNum_notIn"));
				Integer dealTaskNum_between1 = TypeCast.getInteger(scheduleInstanceMap.get("dealTaskNum_between1"));
				Integer dealTaskNum_between2 = TypeCast.getInteger(scheduleInstanceMap.get("dealTaskNum_between2"));
				Integer dealTaskNum_notBetween1 = TypeCast.getInteger(scheduleInstanceMap.get("dealTaskNum_notBetween1"));
				Integer dealTaskNum_notBetween2 = TypeCast.getInteger(scheduleInstanceMap.get("dealTaskNum_notBetween2"));
				
				if(dealTaskNum_null != null){
					c.andDealTaskNumIsNull();
				}
				if(dealTaskNum_notNull != null){
					c.andDealTaskNumIsNotNull();
				}
				if(dealTaskNum != null){
					c.andDealTaskNumEqualTo(dealTaskNum);
				}
				if(dealTaskNum_not != null){
					c.andDealTaskNumNotEqualTo(dealTaskNum_not);
				}
				if(dealTaskNum_greater != null){
					c.andDealTaskNumGreaterThan(dealTaskNum_greater);
				}
				if(dealTaskNum_greaterEqual != null){
					c.andDealTaskNumGreaterThanOrEqualTo(dealTaskNum_greaterEqual);
				}
				if(dealTaskNum_less != null){
					c.andDealTaskNumLessThan(dealTaskNum_less);
				}
				if(dealTaskNum_lessEqual != null){
					c.andDealTaskNumLessThanOrEqualTo(dealTaskNum_lessEqual);
				}
				if(dealTaskNum_in != null){
					c.andDealTaskNumIn(dealTaskNum_in);
				}
				if(dealTaskNum_notIn != null){
					c.andDealTaskNumNotIn(dealTaskNum_notIn);
				}
				if(dealTaskNum_between1 != null){
					c.andDealTaskNumBetween(dealTaskNum_between1,dealTaskNum_between2);
				}
				if(dealTaskNum_notBetween1 != null){
					c.andDealTaskNumNotBetween(dealTaskNum_notBetween1,dealTaskNum_notBetween2);
				}
				String misfireInformIds_null = TypeCast.getString(scheduleInstanceMap.get("misfireInformIds_null"));
				String misfireInformIds_notNull = TypeCast.getString(scheduleInstanceMap.get("misfireInformIds_notNull"));
				String misfireInformIds = TypeCast.getString(scheduleInstanceMap.get("misfireInformIds"));
				String misfireInformIds_not = TypeCast.getString(scheduleInstanceMap.get("misfireInformIds_not"));
				String misfireInformIds_greater = TypeCast.getString(scheduleInstanceMap.get("misfireInformIds_greater"));
				String misfireInformIds_greaterEqual = TypeCast.getString(scheduleInstanceMap.get("misfireInformIds_greaterEqual"));
				String misfireInformIds_less = TypeCast.getString(scheduleInstanceMap.get("misfireInformIds_less"));
				String misfireInformIds_lessEqual = TypeCast.getString(scheduleInstanceMap.get("misfireInformIds_lessEqual"));
				String misfireInformIds_like = TypeCast.getString(scheduleInstanceMap.get("misfireInformIds_like"));
				String misfireInformIds_notLike = TypeCast.getString(scheduleInstanceMap.get("misfireInformIds_notLike"));
				List<String> misfireInformIds_in = TypeCast.getStringList(scheduleInstanceMap.get("misfireInformIds_in"));
				List<String> misfireInformIds_notIn = TypeCast.getStringList(scheduleInstanceMap.get("misfireInformIds_notIn"));
				String misfireInformIds_between1 = TypeCast.getString(scheduleInstanceMap.get("misfireInformIds_between1"));
				String misfireInformIds_between2 = TypeCast.getString(scheduleInstanceMap.get("misfireInformIds_between2"));
				String misfireInformIds_notBetween1 = TypeCast.getString(scheduleInstanceMap.get("misfireInformIds_notBetween1"));
				String misfireInformIds_notBetween2 = TypeCast.getString(scheduleInstanceMap.get("misfireInformIds_notBetween2"));
				
				if(misfireInformIds_null != null){
					c.andMisfireInformIdsIsNull();
				}
				if(misfireInformIds_notNull != null){
					c.andMisfireInformIdsIsNotNull();
				}
				if(misfireInformIds != null){
					c.andMisfireInformIdsEqualTo(misfireInformIds);
				}
				if(misfireInformIds_not != null){
					c.andMisfireInformIdsNotEqualTo(misfireInformIds_not);
				}
				if(misfireInformIds_greater != null){
					c.andMisfireInformIdsGreaterThan(misfireInformIds_greater);
				}
				if(misfireInformIds_greaterEqual != null){
					c.andMisfireInformIdsGreaterThanOrEqualTo(misfireInformIds_greaterEqual);
				}
				if(misfireInformIds_less != null){
					c.andMisfireInformIdsLessThan(misfireInformIds_less);
				}
				if(misfireInformIds_lessEqual != null){
					c.andMisfireInformIdsLessThanOrEqualTo(misfireInformIds_lessEqual);
				}
				if(misfireInformIds_like != null){
					c.andMisfireInformIdsLike(misfireInformIds_like);
				}
				if(misfireInformIds_notLike != null){
					c.andMisfireInformIdsNotLike(misfireInformIds_notLike);
				}
				if(misfireInformIds_in != null){
					c.andMisfireInformIdsIn(misfireInformIds_in);
				}
				if(misfireInformIds_notIn != null){
					c.andMisfireInformIdsNotIn(misfireInformIds_notIn);
				}
				if(misfireInformIds_between1 != null){
					c.andMisfireInformIdsBetween(misfireInformIds_between1,misfireInformIds_between2);
				}
				if(misfireInformIds_notBetween1 != null){
					c.andMisfireInformIdsNotBetween(misfireInformIds_notBetween1,misfireInformIds_notBetween2);
				}
				Integer isSingle_null = TypeCast.getInteger(scheduleInstanceMap.get("isSingle_null"));
				Integer isSingle_notNull = TypeCast.getInteger(scheduleInstanceMap.get("isSingle_notNull"));
				Integer isSingle = TypeCast.getInteger(scheduleInstanceMap.get("isSingle"));
				Integer isSingle_not = TypeCast.getInteger(scheduleInstanceMap.get("isSingle_not"));
				Integer isSingle_greater = TypeCast.getInteger(scheduleInstanceMap.get("isSingle_greater"));
				Integer isSingle_greaterEqual = TypeCast.getInteger(scheduleInstanceMap.get("isSingle_greaterEqual"));
				Integer isSingle_less = TypeCast.getInteger(scheduleInstanceMap.get("isSingle_less"));
				Integer isSingle_lessEqual = TypeCast.getInteger(scheduleInstanceMap.get("isSingle_lessEqual"));
				List<Integer> isSingle_in = TypeCast.getIntegerList(scheduleInstanceMap.get("isSingle_in"));
				List<Integer> isSingle_notIn = TypeCast.getIntegerList(scheduleInstanceMap.get("isSingle_notIn"));
				Integer isSingle_between1 = TypeCast.getInteger(scheduleInstanceMap.get("isSingle_between1"));
				Integer isSingle_between2 = TypeCast.getInteger(scheduleInstanceMap.get("isSingle_between2"));
				Integer isSingle_notBetween1 = TypeCast.getInteger(scheduleInstanceMap.get("isSingle_notBetween1"));
				Integer isSingle_notBetween2 = TypeCast.getInteger(scheduleInstanceMap.get("isSingle_notBetween2"));
				
				if(isSingle_null != null){
					c.andIsSingleIsNull();
				}
				if(isSingle_notNull != null){
					c.andIsSingleIsNotNull();
				}
				if(isSingle != null){
					c.andIsSingleEqualTo(isSingle);
				}
				if(isSingle_not != null){
					c.andIsSingleNotEqualTo(isSingle_not);
				}
				if(isSingle_greater != null){
					c.andIsSingleGreaterThan(isSingle_greater);
				}
				if(isSingle_greaterEqual != null){
					c.andIsSingleGreaterThanOrEqualTo(isSingle_greaterEqual);
				}
				if(isSingle_less != null){
					c.andIsSingleLessThan(isSingle_less);
				}
				if(isSingle_lessEqual != null){
					c.andIsSingleLessThanOrEqualTo(isSingle_lessEqual);
				}
				if(isSingle_in != null){
					c.andIsSingleIn(isSingle_in);
				}
				if(isSingle_notIn != null){
					c.andIsSingleNotIn(isSingle_notIn);
				}
				if(isSingle_between1 != null){
					c.andIsSingleBetween(isSingle_between1,isSingle_between2);
				}
				if(isSingle_notBetween1 != null){
					c.andIsSingleNotBetween(isSingle_notBetween1,isSingle_notBetween2);
				}
				String createIp_null = TypeCast.getString(scheduleInstanceMap.get("createIp_null"));
				String createIp_notNull = TypeCast.getString(scheduleInstanceMap.get("createIp_notNull"));
				String createIp = TypeCast.getString(scheduleInstanceMap.get("createIp"));
				String createIp_not = TypeCast.getString(scheduleInstanceMap.get("createIp_not"));
				String createIp_greater = TypeCast.getString(scheduleInstanceMap.get("createIp_greater"));
				String createIp_greaterEqual = TypeCast.getString(scheduleInstanceMap.get("createIp_greaterEqual"));
				String createIp_less = TypeCast.getString(scheduleInstanceMap.get("createIp_less"));
				String createIp_lessEqual = TypeCast.getString(scheduleInstanceMap.get("createIp_lessEqual"));
				String createIp_like = TypeCast.getString(scheduleInstanceMap.get("createIp_like"));
				String createIp_notLike = TypeCast.getString(scheduleInstanceMap.get("createIp_notLike"));
				List<String> createIp_in = TypeCast.getStringList(scheduleInstanceMap.get("createIp_in"));
				List<String> createIp_notIn = TypeCast.getStringList(scheduleInstanceMap.get("createIp_notIn"));
				String createIp_between1 = TypeCast.getString(scheduleInstanceMap.get("createIp_between1"));
				String createIp_between2 = TypeCast.getString(scheduleInstanceMap.get("createIp_between2"));
				String createIp_notBetween1 = TypeCast.getString(scheduleInstanceMap.get("createIp_notBetween1"));
				String createIp_notBetween2 = TypeCast.getString(scheduleInstanceMap.get("createIp_notBetween2"));
				
				if(createIp_null != null){
					c.andCreateIpIsNull();
				}
				if(createIp_notNull != null){
					c.andCreateIpIsNotNull();
				}
				if(createIp != null){
					c.andCreateIpEqualTo(createIp);
				}
				if(createIp_not != null){
					c.andCreateIpNotEqualTo(createIp_not);
				}
				if(createIp_greater != null){
					c.andCreateIpGreaterThan(createIp_greater);
				}
				if(createIp_greaterEqual != null){
					c.andCreateIpGreaterThanOrEqualTo(createIp_greaterEqual);
				}
				if(createIp_less != null){
					c.andCreateIpLessThan(createIp_less);
				}
				if(createIp_lessEqual != null){
					c.andCreateIpLessThanOrEqualTo(createIp_lessEqual);
				}
				if(createIp_like != null){
					c.andCreateIpLike(createIp_like);
				}
				if(createIp_notLike != null){
					c.andCreateIpNotLike(createIp_notLike);
				}
				if(createIp_in != null){
					c.andCreateIpIn(createIp_in);
				}
				if(createIp_notIn != null){
					c.andCreateIpNotIn(createIp_notIn);
				}
				if(createIp_between1 != null){
					c.andCreateIpBetween(createIp_between1,createIp_between2);
				}
				if(createIp_notBetween1 != null){
					c.andCreateIpNotBetween(createIp_notBetween1,createIp_notBetween2);
				}
				String execIp_null = TypeCast.getString(scheduleInstanceMap.get("execIp_null"));
				String execIp_notNull = TypeCast.getString(scheduleInstanceMap.get("execIp_notNull"));
				String execIp = TypeCast.getString(scheduleInstanceMap.get("execIp"));
				String execIp_not = TypeCast.getString(scheduleInstanceMap.get("execIp_not"));
				String execIp_greater = TypeCast.getString(scheduleInstanceMap.get("execIp_greater"));
				String execIp_greaterEqual = TypeCast.getString(scheduleInstanceMap.get("execIp_greaterEqual"));
				String execIp_less = TypeCast.getString(scheduleInstanceMap.get("execIp_less"));
				String execIp_lessEqual = TypeCast.getString(scheduleInstanceMap.get("execIp_lessEqual"));
				String execIp_like = TypeCast.getString(scheduleInstanceMap.get("execIp_like"));
				String execIp_notLike = TypeCast.getString(scheduleInstanceMap.get("execIp_notLike"));
				List<String> execIp_in = TypeCast.getStringList(scheduleInstanceMap.get("execIp_in"));
				List<String> execIp_notIn = TypeCast.getStringList(scheduleInstanceMap.get("execIp_notIn"));
				String execIp_between1 = TypeCast.getString(scheduleInstanceMap.get("execIp_between1"));
				String execIp_between2 = TypeCast.getString(scheduleInstanceMap.get("execIp_between2"));
				String execIp_notBetween1 = TypeCast.getString(scheduleInstanceMap.get("execIp_notBetween1"));
				String execIp_notBetween2 = TypeCast.getString(scheduleInstanceMap.get("execIp_notBetween2"));
				
				if(execIp_null != null){
					c.andExecIpIsNull();
				}
				if(execIp_notNull != null){
					c.andExecIpIsNotNull();
				}
				if(execIp != null){
					c.andExecIpEqualTo(execIp);
				}
				if(execIp_not != null){
					c.andExecIpNotEqualTo(execIp_not);
				}
				if(execIp_greater != null){
					c.andExecIpGreaterThan(execIp_greater);
				}
				if(execIp_greaterEqual != null){
					c.andExecIpGreaterThanOrEqualTo(execIp_greaterEqual);
				}
				if(execIp_less != null){
					c.andExecIpLessThan(execIp_less);
				}
				if(execIp_lessEqual != null){
					c.andExecIpLessThanOrEqualTo(execIp_lessEqual);
				}
				if(execIp_like != null){
					c.andExecIpLike(execIp_like);
				}
				if(execIp_notLike != null){
					c.andExecIpNotLike(execIp_notLike);
				}
				if(execIp_in != null){
					c.andExecIpIn(execIp_in);
				}
				if(execIp_notIn != null){
					c.andExecIpNotIn(execIp_notIn);
				}
				if(execIp_between1 != null){
					c.andExecIpBetween(execIp_between1,execIp_between2);
				}
				if(execIp_notBetween1 != null){
					c.andExecIpNotBetween(execIp_notBetween1,execIp_notBetween2);
				}
				Date createTime_null = TypeCast.getDate(scheduleInstanceMap.get("createTime_null"));
				Date createTime_notNull = TypeCast.getDate(scheduleInstanceMap.get("createTime_notNull"));
				Date createTime = TypeCast.getDate(scheduleInstanceMap.get("createTime"));
				Date createTime_not = TypeCast.getDate(scheduleInstanceMap.get("createTime_not"));
				Date createTime_greater = TypeCast.getDate(scheduleInstanceMap.get("createTime_greater"));
				Date createTime_greaterEqual = TypeCast.getDate(scheduleInstanceMap.get("createTime_greaterEqual"));
				Date createTime_less = TypeCast.getDate(scheduleInstanceMap.get("createTime_less"));
				Date createTime_lessEqual = TypeCast.getDate(scheduleInstanceMap.get("createTime_lessEqual"));
				List<Date> createTime_in = TypeCast.getDateList(scheduleInstanceMap.get("createTime_in"));
				List<Date> createTime_notIn = TypeCast.getDateList(scheduleInstanceMap.get("createTime_notIn"));
				Date createTime_between1 = TypeCast.getDate(scheduleInstanceMap.get("createTime_between1"));
				Date createTime_between2 = TypeCast.getDate(scheduleInstanceMap.get("createTime_between2"));
				Date createTime_notBetween1 = TypeCast.getDate(scheduleInstanceMap.get("createTime_notBetween1"));
				Date createTime_notBetween2 = TypeCast.getDate(scheduleInstanceMap.get("createTime_notBetween2"));
				
				if(createTime_null != null){
					c.andCreateTimeIsNull();
				}
				if(createTime_notNull != null){
					c.andCreateTimeIsNotNull();
				}
				if(createTime != null){
					c.andCreateTimeEqualTo(createTime);
				}
				if(createTime_not != null){
					c.andCreateTimeNotEqualTo(createTime_not);
				}
				if(createTime_greater != null){
					c.andCreateTimeGreaterThan(createTime_greater);
				}
				if(createTime_greaterEqual != null){
					c.andCreateTimeGreaterThanOrEqualTo(createTime_greaterEqual);
				}
				if(createTime_less != null){
					c.andCreateTimeLessThan(createTime_less);
				}
				if(createTime_lessEqual != null){
					c.andCreateTimeLessThanOrEqualTo(createTime_lessEqual);
				}
				if(createTime_in != null){
					c.andCreateTimeIn(createTime_in);
				}
				if(createTime_notIn != null){
					c.andCreateTimeNotIn(createTime_notIn);
				}
				if(createTime_between1 != null){
					c.andCreateTimeBetween(createTime_between1,createTime_between2);
				}
				if(createTime_notBetween1 != null){
					c.andCreateTimeNotBetween(createTime_notBetween1,createTime_notBetween2);
				}
				Date updateTime_null = TypeCast.getDate(scheduleInstanceMap.get("updateTime_null"));
				Date updateTime_notNull = TypeCast.getDate(scheduleInstanceMap.get("updateTime_notNull"));
				Date updateTime = TypeCast.getDate(scheduleInstanceMap.get("updateTime"));
				Date updateTime_not = TypeCast.getDate(scheduleInstanceMap.get("updateTime_not"));
				Date updateTime_greater = TypeCast.getDate(scheduleInstanceMap.get("updateTime_greater"));
				Date updateTime_greaterEqual = TypeCast.getDate(scheduleInstanceMap.get("updateTime_greaterEqual"));
				Date updateTime_less = TypeCast.getDate(scheduleInstanceMap.get("updateTime_less"));
				Date updateTime_lessEqual = TypeCast.getDate(scheduleInstanceMap.get("updateTime_lessEqual"));
				List<Date> updateTime_in = TypeCast.getDateList(scheduleInstanceMap.get("updateTime_in"));
				List<Date> updateTime_notIn = TypeCast.getDateList(scheduleInstanceMap.get("updateTime_notIn"));
				Date updateTime_between1 = TypeCast.getDate(scheduleInstanceMap.get("updateTime_between1"));
				Date updateTime_between2 = TypeCast.getDate(scheduleInstanceMap.get("updateTime_between2"));
				Date updateTime_notBetween1 = TypeCast.getDate(scheduleInstanceMap.get("updateTime_notBetween1"));
				Date updateTime_notBetween2 = TypeCast.getDate(scheduleInstanceMap.get("updateTime_notBetween2"));
				
				if(updateTime_null != null){
					c.andUpdateTimeIsNull();
				}
				if(updateTime_notNull != null){
					c.andUpdateTimeIsNotNull();
				}
				if(updateTime != null){
					c.andUpdateTimeEqualTo(updateTime);
				}
				if(updateTime_not != null){
					c.andUpdateTimeNotEqualTo(updateTime_not);
				}
				if(updateTime_greater != null){
					c.andUpdateTimeGreaterThan(updateTime_greater);
				}
				if(updateTime_greaterEqual != null){
					c.andUpdateTimeGreaterThanOrEqualTo(updateTime_greaterEqual);
				}
				if(updateTime_less != null){
					c.andUpdateTimeLessThan(updateTime_less);
				}
				if(updateTime_lessEqual != null){
					c.andUpdateTimeLessThanOrEqualTo(updateTime_lessEqual);
				}
				if(updateTime_in != null){
					c.andUpdateTimeIn(updateTime_in);
				}
				if(updateTime_notIn != null){
					c.andUpdateTimeNotIn(updateTime_notIn);
				}
				if(updateTime_between1 != null){
					c.andUpdateTimeBetween(updateTime_between1,updateTime_between2);
				}
				if(updateTime_notBetween1 != null){
					c.andUpdateTimeNotBetween(updateTime_notBetween1,updateTime_notBetween2);
				}
			if(scheduleInstanceMap.get("orderBy")!=null){
				scheduleInstanceEx.setOrderByClause((String)scheduleInstanceMap.get("orderBy"));
			}
			if(limitStart != null && limitOffset != null){
				scheduleInstanceEx.setLimitStart(limitStart);
				scheduleInstanceEx.setLimitOffset(limitOffset);
			}
			
			return scheduleInstanceEx;
	}
}
